<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <!-- import CSS -->
    <link rel="stylesheet" href="https://cdn.staticfile.org/element-ui/2.15.9/theme-chalk/index.css">
    <style>
        .el-header a{
            color: #666;
            text-decoration: none;
        }
        .el-menu.el-menu--horizontal{
            border-bottom: 0;
        }
        .el-table .el-table__cell{
            padding: 0;
        }
    </style>
</head>
<body>
<div id="app">
    <el-container>
        <el-header height="150px">
            <div style="width: 1200px;margin: 0 auto">
            </div>
            <!--导航菜单开始-->
            <div style="background-color: #0aa1ed" >
                <el-menu style="width: 1200px;margin: 0 auto" mode="horizontal" background-color="#0aa1ed"
                         text-color="#fff" active-text-color="#fff" @select="handleSelect">
                    <el-menu-item index="1">减脂代餐</el-menu-item >
                    <el-menu-item index="2">健身补剂</el-menu-item>
                    <el-menu-item index="3">健身器械</el-menu-item>
                    <el-menu-item index="4">健身服饰</el-menu-item>

                    <div style="float: right;position: relative;top: 10px">
                        <el-input type="text">
                            <!--在文本框中内嵌一个搜索按钮-->
                            <el-button slot="append" icon="el-icon-search"></el-button>
                        </el-input>
                    </div>
                </el-menu>
            </div>
            <!--导航菜单结束-->
        </el-header>
        <el-main style="width: 1200px;margin: 0 auto">
            <el-row gutter="20">
                <el-col span="18">
                    <!--走马灯开始-->
                    <el-carousel trigger="click" height="500px">
                        <el-carousel-item v-for="item in 2">
                            <img :src="'imgs/b'+item+'.png'" width="50%" alt="">
                        </el-carousel-item>
                    </el-carousel>
                    <!--走马灯结束-->
                </el-col>
                <el-col span="6">
                    <!--排行榜开始-->
                    <el-card>
                        <h3>
                            <i style="font-weight: bold" class="el-icon-trophy"> 健身最爱</i>
                        </h3>
                        <el-divider></el-divider>
                        <el-table :data="topArr">
                            <el-table-column type="index" label="排名"></el-table-column>
                            <el-table-column prop="title" label="商品标题"></el-table-column>
                            <el-table-column prop="saleCount" label="商品销量"></el-table-column>
                        </el-table>
                    </el-card>
                    <!--排行榜结束-->
                </el-col>
            </el-row>

            <el-row gutter="20">
                <el-col span="6" v-for="p in productArr">
                    <el-card>
                        <img :src="p.url" width="100%" height="233">
                        <p style="font-size: 14px;height: 30px">{{p.title}}</p>
                        <p>
                            <b>￥{{p.price}}</b>
                            <s>{{p.oldPrice}}</s>
                            <span style="float: right">
                                销量:{{p.saleCount}}件</span>
                        </p>
                    </el-card>
                </el-col>
            </el-row>


        </el-main>
        <el-footer>
            <div style="background-color: #282c30;color: #666;text-align: center;padding: 50px 0">
                <p>Copyright ©武汉强盛健身有限公司版权所有 京ICP备12003709号-3 京公网安备 11010802029572号</p>
                <p>涵盖五环天地楼下仅此一家，致力于打造权威的健身平台</p>
                <img src="imgs/4.png" height="200">
            </div>
        </el-footer>
    </el-container>
</div>
</body>

<!-- import Vue before Element -->
<script src="https://cdn.staticfile.org/vue/2.6.14/vue.min.js"></script>
<!-- import JavaScript -->
<script src="https://cdn.staticfile.org/element-ui/2.15.9/index.min.js"></script>
<script>
    let v = new Vue({
        el: '#app',
        data: function () {
            return {
                currentIndex:"1-1",
                    topArr:[{title:"良品铺子 黑麦全麦面包",saleCount:10000},
                        {title:"鲨鱼菲特 全麦面包欧包",saleCount:8000},
                        {title:"斯维诗 乳清蛋白粉香草味",saleCount:5506},
                        {title:"康比特 Pro增肌粉",saleCount:4800},
                        {title:"腿部按摩器滚轮肌肉放松",saleCount:3500},
                        {title:"耐克健身套装男",saleCount:3000}],
                    productArr:[{title:"瑜伽服套装女固定胸垫防震跑步运动专业普拉提训练速干长袖气质健身衣",price:99,oldPrice:598,uri:"imgs/c2.png",saleCount:8000},
                        {title:"耐克 NIKE 男子 紧身服  运动服 DD1991-100 白色 M码",price:299,oldPrice:598,url:"imgs/c1.png",saleCount:6000},
                        {title:"康佑健 腿部按摩器滚轮 美腿夹环形 小腿按摩器",price:59,oldPrice:88,url:"imgs/b2.png",saleCount:3000},
                        {title:"尚官（SingleLady）腿部按摩器滚轮肌肉放松",price:49,oldPrice:99,url:"imgs/b1.png",saleCount:3000},
                        {title:"康比特SFMASS Pro增肌粉5磅 草莓味",price:588,oldPrice:988,url:"imgs/a2.png",saleCount:2342},
                        {title:"99%高含量乳清蛋白质粉",price:388,oldPrice:598,url:"imgs/a1.png",saleCount:2342},
                        {title:"鲨鱼菲特 全麦面包欧包 奶酪夹心无蔗糖",price:39,oldPrice:59,url:"imgs/d.png",saleCount:2342},
                        {title:"鲨鱼菲特（SHARKFIT） 五黑紫米欧包",price:39,oldPrice:59,url:"imgs/c.png",saleCount:2342},
                        {title:"舌里 全麦面包0脂肪无油无蔗糖",price:29,oldPrice:59,url:"imgs/a.png",saleCount:2342},
                        {title:"杜威克 飞力士棒 健身弹力菲利斯棒抖抖杆训练振动杆",price:29,oldPrice:59,url:"imgs/b3.png",saleCount:2342},
                        {title:"夹腿训练器盆底腿肌肉练大腿内侧瘦凯格臀锻炼部神男士尔器PC肌",price:29,oldPrice:59,url:"imgs/b4.png",saleCount:2342},
                        {title:"暴肌独角兽全麦面包欧包低脂",price:50,oldPrice:39,url:"imgs/b.png",saleCount:2342}]
                }
            },
        methods:{
            handleSelect(key){
                v.currentIndex=key;
            }
        }
    })
</script>
</html>